<?php
/**
 * Export en CSV des réservations
 *
 * @package zfbook
 * @subpackage controller
 */
class Zfbook_Controller_ActionHelpers_ExportReservations_Csv
extends Zfbook_Controller_ActionHelpers_ExportReservations_Abstract 
{
    const MIME_TYPE = 'text/csv';

    /**
     * Mime type CSV
     *
     * @return string
     */
    public function getMimeType()
    {
        return self::MIME_TYPE;
    }

    /**
     * Construit et retourne le flux CSV des réservations
     *
     * @return string
     */
    public function getContent()
    {
        // Appel de la méthode de conversion CSV
        return Zfbook_Convert_Csv::getInstance()->convertFromArray($this->_resaTab);
    }
}
